import { getAsyncRoute } from "@/api/routes";
import { useRoutesStore } from "@/stores/router";
export async function initRoutes() {
  const [, res] = await getAsyncRoute();
  const routesStore = useRoutesStore();
  if (res) {
    routesStore.setRoutes(res.data);
    return res.data;
  }
  return [];
}
